package com.formula.propertyshop.view.common;

import java.util.ArrayList;
import java.util.List;

import android.content.Context;
import android.content.Intent;
import android.util.AttributeSet;
import android.view.View;
import android.widget.Button;
import android.widget.TableLayout;

import com.formula.propertyshop.R;
import com.formula.propertyshop.view.phone.ChartActivity;
import com.formula.propertyshop.view.phone.LoanCalculator;

public class BSDCalculatorMenuBar extends TableLayout{

	private Button btnBSD;
	private Button btnABSD;
	private List<Button>lstButton = new ArrayList<Button>();
	public BSDCalculatorMenuBar(Context context) {
		super(context);
		// TODO Auto-generated constructor stub
	}
	public BSDCalculatorMenuBar(Context context, AttributeSet attrs){
		super(context, attrs);
	}
	public void initUI(){
		btnBSD = (Button) findViewById(R.id.btnBSD);
		btnABSD = (Button) findViewById(R.id.btnABSD);
		lstButton.add(btnBSD);
		lstButton.add(btnABSD);
	}
	public void setButtonActive(int position){
		for(int i=0;i<lstButton.size();i++){
			if(i==position){
				lstButton.get(i).setBackgroundResource(R.drawable.button_bg_selected);
			}else{
				lstButton.get(i).setBackgroundResource(R.drawable.button_bg);
			}
		}
	}
	public Button getBtnBSD() {
		return btnBSD;
	}
	public Button getBtnABSD() {
		return btnABSD;
	}
	
}
